package Service.Impl;

import Service.ISystemRealService;

public class SystemRealServiceImpl implements ISystemRealService {

    @Override
    public String realHexadecimal(Object in, String inputType) {
        if (inputType.equals("Integer")) {
            Integer tempIn = (Integer) in;
            return Integer.toHexString(tempIn);
        } else if (inputType.equals("Float")) {
            float tempIn = (float) in;
            return Float.toHexString(tempIn);
        } else {
            char tempIn = (char) in;
            return java.lang.Integer.toHexString(tempIn & 0XFF);
        }
    }

    @Override
    public int realLocation(Object in) {
        int location = System.identityHashCode(in);
        return location;
    }
}
